package ink.tiptop.persist.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import ink.tiptop.persist.domain.entity.ZjfModuleLocalViewEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 本地模块结构视图(ZjfModuleLocalView)表数据库访问层
 *
 * @author makejava
 * @since 2020-07-21 20:16:46
 */
@Mapper
public interface ZjfModuleLocalViewMapper  extends BaseMapper<ZjfModuleLocalViewEntity> {

    @Select("  SELECT DISTINCT\n" +
            "        ( a.id )\n" +
            "        FROM\n" +
            "        zjf_service_remote_view a\n" +
            "        INNER JOIN zjf_module_local_view b ON a.id = b.remote_id\n" +
            "        where a.id in ( ${ids} )")
    List<Integer> listRelatedIdList(@Param("ids") String ids);

}